package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.SaleStageModifyLogEntity;
import com.xbongbong.saas.domain.entity.SaleStageSyncStatusEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 销售阶段dao层接口
 *
 * @author haibin.zhang
 * @date 2019-02-13 13:50
 */
@Repository
@Mapper
public interface SaleStageSyncStatusDao {

    List<SaleStageSyncStatusEntity> findEntitys(@Param("param") Map<String, Object> param);

    SaleStageSyncStatusEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);

    SaleStageSyncStatusEntity getByStageProcessId(@Param("corpid") String corpid, @Param("formId") Long formId, @Param("stageProcessId") Long stageProcessId);

    Integer insert(SaleStageSyncStatusEntity entity);

    Integer update(SaleStageSyncStatusEntity entity);

    void insertBatch(List<SaleStageSyncStatusEntity> list);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);

    Integer deleteBatch(@Param("list") List<SaleStageSyncStatusEntity> saleStageSyncStatusEntityList, @Param("corpid") String corpid);

}
